[index]

Function Control Statement

Syntax

function <functionName> [<parameters>]
[...] return <value> end <functionName>

Description

The function control statement defines a handler that performs the tasks in the statement list, which can include calculating and returning a value. The function may receive parameters when it is called. The parameters, if used, take the form of a list of local variable names separated by commas. A function handler differs from other handlers, such as message handlers and XCMDs, in that a function always returns a value. This value can be numerical, logical, or text. The return value is determined by the return statement in the Oracle Media Talk code of the function. The major purpose of functions is to shorten scripts and make it easier for you to change scripts by separating frequently made calculations from the remainder of the script. A function is called by stating its name and providing values for its parameters. Enclose the values in parentheses and separate them with commas. For example: put <functionName> ([<parameter1, parameter2, ...>]) into <variable>

Notes


This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.